-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: support hiding empty services #1264
Conversation
2023-09-28 17:21:14: =========TEST START========== |
@chuntaojun 大佬有空帮忙review下 |
if hideEmptyService { | ||
nonEmptyServices := make([]*model.EnhancedService, 0, len(services)) | ||
for _, service := range services { | ||
if service.HealthyInstanceCount > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参数描述和实际逻辑不符合,建议改为 only_exist_healthyinstance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个查询逻辑应该放在 s.caches.Service().GetServicesByFilter 里面,否则你这个查询是有问题的
@@ -156,6 +159,9 @@ func EnrichGetServicesApiDocs(r *restful.RouteBuilder) *restful.RouteBuilder { | |||
" 和 instance_values 需要同时填写且必须元素个数一致"). | |||
DataType(typeNameString). | |||
Required(false)). | |||
Param(restful.QueryParameter("hide_empty_service", "隐藏空服务").DataType(typeNameBool). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有隐藏空服务这个逻辑了吧?
if hideEmptyService { | ||
nonEmptyServices := make([]*model.EnhancedService, 0, len(services)) | ||
for _, service := range services { | ||
if service.HealthyInstanceCount > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个查询逻辑应该放在 s.caches.Service().GetServicesByFilter 里面,否则你这个查询是有问题的
Please provide issue(s) of this PR:
Fixes #1182 #1133
polaris-console相关的PR:
polarismesh/polaris-console#247
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.
Please check any characteristics that apply to this pull request.